/*
 * WifiServer.h
 *
 *  Created on: 2023年4月13日
 *      Author: 15271
 */

#ifndef HTTPPROT_WIFISERVER_H_
#define HTTPPROT_WIFISERVER_H_

#include <mutex>
#include "json.h"
#include "Network/Buffer.h"

using namespace std;
using namespace Fdt;

class WifiServer{
public:
	static WifiServer *instance();
	void RegistRPC();
	bool ScanWifi(const Json::Value &request, const Fdt::BufferMap::Ptr &inMap, Json::Value &response, Fdt::BufferMap::Ptr &outBuffer);
	bool ConnectWifi(const Json::Value &request, const Fdt::BufferMap::Ptr &inMap, Json::Value &response, Fdt::BufferMap::Ptr &outBuffer);
	bool openApService(const Json::Value &request, const Fdt::BufferMap::Ptr &inMap, Json::Value &response, Fdt::BufferMap::Ptr &outBuffer);
private:
	WifiServer();
	~WifiServer();
private:
	static WifiServer *sm_wifiServer;
	static mutex sm_instanceLock;
};




#endif /* HTTPPROT_WIFISERVER_H_ */
